
const arr: [number, boolean] = [1, false]
arr[0] = 2
// arr[2] = 1 // 报错
arr.push(1)
arr.push(false)
// arr.push('string') // 报错

// enum Days {Sun, Mon, Tue, Wed, Thu, Fri, Sat};
// console.log(Days['Sun']); // 0
// console.log(Days[0]); // 'Sun'

enum Days {
  Sun = 7, 
  Mon = 1, 
  Tue = 2, 
  Wed = 3, 
  Thu = 4, 
  Fri = 5, 
  Sat = 6 
};
console.log(Days['Sun']); // 7
console.log(Days[7]); // 'Sun'
  

